package com.processmining.logdeploy.autodeploy.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class Server implements Serializable {

    private Long id;

    @NotNull(message = "ip不能为空")
    private String ip;

    @NotNull(message = "端口不能为空")
    private Long port;

    @NotNull(message = "用户名不能为空")
    private String username;

    @NotNull(message = "密码不能为空")
    private String password;

    public enum Status {
        CONNECTED, DISCONNECTED
    }

    private Status status;

    @NotNull(message = "是否使用默认配置字段不能为空")
    private Boolean is_default;

    @NotNull(message = "项目id不能为空")
    private Long project_id;

}
